function genMesh(callback, opt={}) {
    let result
    if (callback instanceof Function) {
        result = callback(opt)
    } else if (callback === undefined || callback === null) {
        let geometry = opt['geometry'] === undefined ? new THREE.BoxGeometry(100, 100, 100) : opt['geometry']
        let material = opt['material'] === undefined ? new THREE.MeshPhongMaterial({
                side: THREE.DoubleSide,
            }) : opt['material']
        let callback = opt['callback']
        if (callback === undefined) {
            result = new THREE.Mesh(geometry, material)
        } else {
            result = callback(opt)
        }
    } else if (callback instanceof Object) {
        opt = callback
        let geometry = opt['geometry'] === undefined ? new THREE.BoxGeometry(100, 100, 100) : opt['geometry']
        let material = opt['material'] === undefined ? new THREE.MeshPhongMaterial({
                side: THREE.DoubleSide,
            }) : opt['material']
        callback = opt['callback']
        if (callback === undefined) {
            result = new THREE.Mesh(geometry, material)
        } else {
            result = callback(opt)
        }
    }
    if (result === undefined || result === null) {
        let geometry = opt['geometry'] === undefined ? new THREE.BoxGeometry(100, 100, 100) : opt['geometry']
        let material = opt['material'] === undefined ? new THREE.MeshPhongMaterial({
                side: THREE.DoubleSide,
            }) : opt['material']
        result = new THREE.Mesh(geometry, material)
    }

    return result
}
